<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<script src="../../resources/js-test.js"></script>
<script>
<![CDATA[
description("Test that appropriate exceptions are thrown when adding children to a ProcessingInstruction.");
var pi = document.createProcessingInstruction('target', 'data');
shouldThrow("pi.appendChild(null)", '"TypeError: Failed to execute \'appendChild\' on \'Node\': parameter 1 is not of type \'Node\'."');
var div = document.createElement('div');
shouldThrow("pi.appendChild(div)", '"HierarchyRequestError: Failed to execute \'appendChild\' on \'Node\': This node type does not support this method."');
var textNode = document.createTextNode('sometext');
shouldThrow("pi.appendChild(textNode)", '"HierarchyRequestError: Failed to execute \'appendChild\' on \'Node\': This node type does not support this method."');
]]>
</script>
</body>
</html>
